/*
* @Author: zhangpeng
* @Description: 工具类
* @LastEditTime: 2024-03-08 15:05:04
*/
//输入方法检验工具类
const regex = {
  validateName: /^(?!·)(?!.*·$)(?!.*··)[\u4e00-\u9fa5·]+$/,
  validateUsername: /^[a-zA-Z0-9_-]+$/,
  validateNickname: /^[a-zA-Z0-9\u4e00-\u9fa5_]+$/,
  validateIdcard: /^[1-9][0-9]{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])\d{3}([0-9]|[Xx])$/,
  validateOfficer: /^军\d{7}$/,
  validatePassport: /^[A-Za-z]{1}\d{8}$|^[A-Za-z]{2}\d{7}$/,
  validateEmail: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
  validatePhone: /^((13[0-9])|(14[1|4|5|6|7|8|9])|(15([0|1|2|3|5|6|7|8|9]))|(16[2|5|6|7])|(17[0|1|2|3|5|6|7|8])|(18[0-9])|(19[1|8|9]|190|192|196|197))\d{8}$/,
  validateSocialCode: /^[1-9]{1}[0-9A-Z]{17}$/,
  validateHkTravel: /^[HM]\d{8}$/,
  validateTWTravel: /^\d{8}$/,
  validateTel: /^\d{3,4}-\d{7,8}$/,
  validateForeignerIdcard: /^[A-Z]{3}\d{12}$|^[A-Z]{3}\d{15}$/,
  validateAdmissionCard: /^[A-Za-z0-9_-]{1,20}$/,
  validateBankCard: /^\d{16,19}$/,
  validateCarNumber: /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,
  validateSmsCode: /^\d+$/,
  validateAdress: /^[\u4e00-\u9fa5A-Za-z0-9-]+$/,
  validateAge: /^[1-9]\d*$/,
  validateCount: /^[+]?\d*\.?\d+$/,
  validateTime: /^\d{4}-\d{2}-\d{2}$/,
  validateWechat: /^[a-zA-Z][a-zA-Z0-9_-]*$/,
  validateQQ: /^[1-9][0-9]*$/,
  validateBook: /^[\u4e00-\u9fa5a-zA-Z0-9《》]*$/,
  validateItemName: /^[\u4e00-\u9fa5a-zA-Z0-9（）]*$/
}
export default regex